/**
 * @project readnote
 * @Title BookDAOImpl.java
 * @author huxh
 * @date 2012-2-12
 **/
package com.readnote.book.dao.impl;

import com.cr.backbone.hibenate.AppBaseDAOImpl;
import com.readnote.book.dao.BookDAO;
import com.readnote.book.model.Book;

public class BookDAOImpl extends AppBaseDAOImpl<Book> implements BookDAO{


//	private SessionFactory sf;
//
//	public void delete(Book... books) {
//		for (Book book : books) {
//			Book b = (Book) sf.getCurrentSession()
//					.get(Book.class, book.getId());
//			if (b != null && !b.isNullRow())
//				sf.getCurrentSession().delete(b);
//		}
//	}
//
//	@SuppressWarnings( { "unchecked", "deprecation" })
//	public List<Book> findAll() {
//		return sf.getCurrentSession().find("from " + Book.class.getName());
//	}
//
//	public Book get(Long bookId) {
//		Book book = (Book) sf.getCurrentSession().get(Book.class, bookId);
//		return book;
//	}
//
//	public void save(Book book) {
//		sf.getCurrentSession().persist(book);
//	}
//
//	public void update(Book book) {
//		sf.getCurrentSession().merge(book);
//		// TODO Auto-generated method stub
//	}
//
//	public SessionFactory getSf() {
//		return sf;
//	}
//
//	public void setSf(SessionFactory sf) {
//		this.sf = sf;
//	}
	
}
